package com.sunshine.androidjavapractise.decode;


import android.text.TextUtils;
import android.util.Base64;

public class DecodeTest {

    public static String decode(String origin) {
        String dest = null;
        if (!TextUtils.isEmpty(origin)) {
            dest = origin.replace("*", "a").replace("&", "i");
        }
        System.out.println("decode result = " + dest);
        if (null != dest) {
            dest = new String(Base64.decode(dest, Base64.DEFAULT));
        }
        return dest;
    }

}
